package com.apps.sconfig;

import com.apps.sconfig.enums.LockType;
import com.apps.sconfig.enums.ScriptThreadType;
import com.apps.sworld.sConfig;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;


public class SDevFastConfig implements sConfig {

    /**
     * local代表使用单机内存数据库,redisson代表使用redisson，需要在spring配置redis连接信息
     */
    private LockType lockType=LockType.LOCAL;
    /**
     * 验证级别,0=不验证,1=只在插入数据时验证,2=插入更新验证,3=插入更新查询都验证
     */
    private Integer verifyLevel=1;

    /**
     * 是否打开系统心跳,默认打开,如果不想打开就设置为0
     */
    private Integer heartopen=1;
    /**
     * 系统心跳周期,默认60秒钟执行一次
     */
    private String  heartCorn="0/60 * * * * ?";

    /**
     * 脚本线程配置
     */
    private ScriptThreadType threadType=ScriptThreadType.AfterMultiThread;

    public LockType getLockType() {
        return lockType;
    }

    public void setLockType(LockType lockType) {
        this.lockType = lockType;
    }

    public Integer getVerifyLevel() {
        return verifyLevel;
    }

    public void setVerifyLevel(Integer verifyLevel) {
        this.verifyLevel = verifyLevel;
    }

    public Integer getHeartopen() {
        return heartopen;
    }

    public void setHeartopen(Integer heartopen) {
        this.heartopen = heartopen;
    }

    public String getHeartCorn() {
        return heartCorn;
    }

    public void setHeartCorn(String heartCorn) {
        this.heartCorn = heartCorn;
    }

    public ScriptThreadType getThreadType() {
        return threadType;
    }

    public void setThreadType(ScriptThreadType threadType) {
        this.threadType = threadType;
    }
}
